package deibay.users;

import java.io.Serializable;

public abstract class User implements Serializable{

	private String id = null;
	private String password = null;
	private String email = null;
	private String address = null;
	
	public User(String id, String password, String email, String address)
	{
		this.id = id;
		this.password = password;
		this.email = email;
		this.address = address;
	}
	
	public String toString()
	{
		return id;
	}
	
	public boolean isAdmin()
	{
		if(this instanceof Admin)
			return true;
		return false;
	}
	
	public boolean isSeller()
	{
		if(this instanceof Seller)
			return true;
		
		return false;
	}
	
	public boolean isBidder()
	{
		if(this instanceof Bidder)
			return true;
		return false;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
}
